
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>使用您的授权码</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
            padding: 20px;
            background-image: url("1.jpg");  /* 添加这行来引入背景图 */
            background-size: cover;  /* 使背景图充满整个容器 */
            background-repeat: no-repeat;  /* 不要重复背景图 */
        }

        .myd {
            width: 60%;
            background-color: #f9f9f9;
            padding: 30px;
            margin: 50px auto;
            border-radius: 10px;
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
        }

        input[type="text"] {
            width: 100%;
            height: 50px;
            padding: 10px;
            font-size: 18px;
            border-radius: 5px;
            border: 1px solid #ccc;
            margin-bottom: 20px;
        }

        button {
            padding: 10px 20px;
            font-size: 16px;
            color: white;
            background-color: #007BFF;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
    </style>
</head>
<body>
<div class="myd">
    <form method="POST">
        <label for="use_au">请输入授权码:</label>
        <input type="text" id="use_au" name="use_au" required/>
        <button type="button" onclick="checkAu()">确认</button>
        <div id="myDiv">激活状态</div>
    </form>
</div>

<script>
    function checkAu(){
        var xhr;
        if (window.XMLHttpRequest)
        {
            xhr=new XMLHttpRequest();
        }else{
            xhr=new ActiveXObject("Microsoft.XMLHTTP");
        }
        var use_au=document.getElementById("use_au").value;
        xhr.open("post","checkAu",true);
        xhr.onreadystatechange=function() {
            if (xhr.readyState == xhr.DONE && xhr.status == 200) {
                document.getElementById("myDiv").innerHTML = xhr.responseText;
            }
        }
        xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
        xhr.send("use_au="+use_au);

    }
</script>

</body>
</html>